/*
** window.c for  in /home/guicqu_g//rush/epikong/etape_1
** 
** Made by gallien guicquero
** Login   <guicqu_g@epitech.net>
** 
** Started on  Fri Mar 25 21:13:26 2011 gallien guicquero
** Last update Sun Mar 27 19:57:41 2011 gallien guicquero
*/

#include "window.h"

int	check_size(char **map, int *cols, int *rows)
{
  int	i;
  int	j;

  *cols = 0;
  *rows = 0;
  if (map)
    {
      i = 0;
      j = 0;
      while (map[i][j])
	++j;
      *cols = j;
      while (map[i])
	++i;
      *rows = i;
    }
  return (0);
}

int	char_to_tex(char c)
{
  if (c == CHAR_WALL)
    return (0);
  if (c == CHAR_MONSTER)
    return (1);
  if (c == CHAR_LADDER)
    return (2);
  if (c == CHAR_INPUT)
    return (3);
  if (c == CHAR_OUTPUT)
    return (4);
  if (c == CHAR_KEY)
    return (5);
  return (-1);
}
